import request from '@/utils/request'

export function getRegeionList(parent, type) {
	const data = {
		parent,
		type
	}
	return request({
		url: '/inspection/region/list',
		method: 'post',
		data: data
	})
}

export function getSystemList() {
	return request({
		url: '/inspection/resource/type/getCategory',
		method: 'get'
	})
}
// 设备详情
export function getRegeionDetails(id) {
	return request({
		url: '/inspection​/resource​',
		method: 'get',
		params: {
			id
		}
	})
}

export function getDeviceList(data) {
	return request({
		url: '/inspection/resource/list',
		method: 'post',
		data: data
	})
}
// 设备保养记录
export function getMaintenanceDetails(id) {
	return request({
		url: '/inspection​/maintenance​​',
		method: 'get',
		params: {
			id
		}
	})
}
// 设备保养记录
export function getPlanDetails(id) {
	return request({
		url: '/inspection​/plan​',
		method: 'get',
		params: {
			id
		}
	})
}
// 维修记录记录
export function getMaintenanceDetailsWx(id) {
	return request({
		url: '/inspection​/maintenance​/type​​',
		method: 'get',
		params: {
			id
		}
	})
}